<h3>动作钩子 Action</h3>
<p>
    动作是 baigo CMS 运行到某些环节，或者在某些事件发生时，就会被执行的一种钩子。任何的插件都可以通过动作钩子来指示系统在遇到这些环节或者事件的时候，就执行指定的 PHP 函数。
</p>

<div>&nbsp;</div>
<div class="text-right">
    <a href="#top">
        <span class="oi oi-chevron-top"></span>
        top
    </a>
</div>
<hr>
<div>&nbsp;</div>

    <h4>全局动作</h4>
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>名称</th>
                    <th>返回</th>
                    <th>说明</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>action_sys_runtime</td>
                    <td>-</td>
                    <td>系统开始运行时触发</td>
                </tr>
                <tr>
                    <td>action_sys_plugin_activated</td>
                    <td>-</td>
                    <td>所有插件激活以后触发</td>
                </tr>
            </tbody>
        </table>
    </div>

<div>&nbsp;</div>
<div class="text-right">
    <a href="#top">
        <span class="oi oi-chevron-top"></span>
        top
    </a>
</div>
<hr>
<div>&nbsp;</div>

    <h4>前台动作</h4>
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>名称</th>
                    <th>返回</th>
                    <th>说明</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>action_pub_init</td>
                    <td>-</td>
                    <td>前台初始化时触发</td>
                </tr>
            </tbody>
        </table>
    </div>

<div>&nbsp;</div>
<div class="text-right">
    <a href="#top">
        <span class="oi oi-chevron-top"></span>
        top
    </a>
</div>
<hr>
<div>&nbsp;</div>

    <h4>管理后台动作</h4>
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>名称</th>
                    <th>返回</th>
                    <th>说明</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>action_console_init</td>
                    <td>-</td>
                    <td>管理后台初始化时触发</td>
                </tr>
                <tr>
                    <td>action_console_article_status</td>
                    <td><a href="{$BG_URL_HELP}index.php?m=plugin&a=articleStatus" target="_blank">混合数组</a></td>
                    <td>修改文章状态时触发</td>
                </tr>
                <tr>
                    <td>action_console_article_box</td>
                    <td><a href="{$BG_URL_HELP}index.php?m=plugin&a=articleBox" target="_blank">混合数组</a></td>
                    <td>修改文章保存位置时触发</td>
                </tr>
                <tr>
                    <td>action_console_article_del</td>
                    <td>文章 ID 数组</td>
                    <td>删除文章时触发</td>
                </tr>
                <tr>
                    <td>action_console_cate_status</td>
                    <td><a href="{$BG_URL_HELP}index.php?m=plugin&a=cateStatus" target="_blank">混合数组</a></td>
                    <td>修改栏目状态时触发</td>
                </tr>
                <tr>
                    <td>action_console_cate_del</td>
                    <td>链接 ID 数组</td>
                    <td>删除栏目时触发</td>
                </tr>
                <tr>
                    <td>action_console_link_status</td>
                    <td><a href="{$BG_URL_HELP}index.php?m=plugin&a=linkStatus" target="_blank">混合数组</a></td>
                    <td>修改链接状态时触发</td>
                </tr>
                <tr>
                    <td>action_console_link_del</td>
                    <td>链接 ID 数组</td>
                    <td>删除链接时触发</td>
                </tr>
                <tr>
                    <td>action_console_spec_status</td>
                    <td><a href="{$BG_URL_HELP}index.php?m=plugin&a=specStatus" target="_blank">混合数组</a></td>
                    <td>修改专题状态时触发</td>
                </tr>
                <tr>
                    <td>action_console_spec_del</td>
                    <td>专题 ID 数组</td>
                    <td>删除专题时触发</td>
                </tr>
            </tbody>
        </table>
    </div>

<div>&nbsp;</div>
<div class="text-right">
    <a href="#top">
        <span class="oi oi-chevron-top"></span>
        top
    </a>
</div>
<hr>
<div>&nbsp;</div>

    <h4>后台界面动作</h4>
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>名称</th>
                    <th>返回</th>
                    <th>说明</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>action_console_head_before</td>
                    <td>-</td>
                    <td>后台界面头部之前</td>
                </tr>
                <tr>
                    <td>action_console_head_after</td>
                    <td>-</td>
                    <td>后台界面头部之后</td>
                </tr>
                <tr>
                    <td>action_console_navbar_before</td>
                    <td>-</td>
                    <td>后台界面导航条之前</td>
                </tr>
                <tr>
                    <td>action_console_navbar_after</td>
                    <td>-</td>
                    <td>后台界面导航条之后</td>
                </tr>
                <tr>
                    <td>action_console_menu_before</td>
                    <td>-</td>
                    <td>后台界面菜单之前</td>
                </tr>
                <tr>
                    <td>action_console_menu_end</td>
                    <td>-</td>
                    <td>后台界面菜单最后（用于增加一个菜单项）</td>
                </tr>
                <tr>
                    <td>action_console_menu_after</td>
                    <td>-</td>
                    <td>后台界面菜单之后</td>
                </tr>
                <tr>
                    <td>action_console_foot_before</td>
                    <td>-</td>
                    <td>后台界面底部之前</td>
                </tr>
                <tr>
                    <td>action_console_foot_after</td>
                    <td>-</td>
                    <td>后台界面底部之后</td>
                </tr>
            </tbody>
        </table>
    </div>

<div>&nbsp;</div>
<div class="text-right">
    <a href="#top">
        <span class="oi oi-chevron-top"></span>
        top
    </a>
</div>
<hr>
<div>&nbsp;</div>

    <h4>安装 / 升级程序动作</h4>
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>名称</th>
                    <th>返回</th>
                    <th>说明</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>action_setup_dbtable_complete</td>
                    <td>-</td>
                    <td>安装程序，生成数据表后触发。</td>
                </tr>
                <tr>
                    <td>action_upgrade_dbtable_complete</td>
                    <td>-</td>
                    <td>升级程序，升级数据表后触发。</td>
                </tr>
            </tbody>
        </table>
    </div>
